﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/PBOAMasterPage.master"
  AutoEventWireup="true" CodeFile="SentBox.aspx.cs" Inherits="MsgMng_SentBox" %>

<%@ Import Namespace="PBOffice.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
  <style>
    .tablestyle { }
    .tablestyle td, .tablestyle th { border: solid #C8DDEF 1px; }
    .tablestyle .rowstyle { }
    .tablestyle .rowstyle:hover { background-color: #DDEAF5; }
    .tablestyle .hand{ cursor:pointer;}
  </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  <uc:Navigator ID="Navigator1" runat="server" Text="发件箱" />
  <asp:CheckBox ID="cbAll" runat="server" Text="全选" AutoPostBack="True" 
    oncheckedchanged="cbAll_CheckedChanged" />
  <asp:GridView ID="gvSentBox" runat="server" AutoGenerateColumns="False" CssClass="tablestyle"
    HorizontalAlign="Center" Width="100%" 
    DataSourceID="odsSentBox">
    <AlternatingRowStyle CssClass="alterrow rowstyle" />
    <Columns>
      <asp:TemplateField HeaderText="删除(√)">
        <ItemTemplate>
          <asp:CheckBox ID="cbDel" runat="server" />
          <asp:HiddenField ID="hfID" runat="server" Value='<%# Eval("MessNo") %>' />
        </ItemTemplate>
        <HeaderStyle Width="70px" />
        <ItemStyle HorizontalAlign="Center" />
      </asp:TemplateField>
      <asp:TemplateField HeaderText="收件人">
        <ItemTemplate>
          <a href="#" onclick="window.showModalDialog('showreceivers.aspx?id=<%# Eval("MessNo") %>');">
            <%# Eval("receiver") %>
          </a>
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="主题">
        <ItemTemplate>
          <asp:Label ID="Label1" runat="server" Text='<%# Bind("MessTitle") %>' CssClass="hand"
            onclick='<%# "window.showModalDialog(\"MailDetail.aspx?id="+Eval("MessNo")+"\");" %>'></asp:Label>
        </ItemTemplate>
      </asp:TemplateField>
      <asp:BoundField HeaderText="发送时间" DataField="MessCreateTime" />
      <asp:BoundField HeaderText="紧急程度" DataField="MessageTypeId" />
    </Columns>
    <HeaderStyle BackColor="#66CCFE" Font-Bold="True" ForeColor="White" />
    <RowStyle CssClass="rowstyle" />
  </asp:GridView>
  <asp:ObjectDataSource ID="odsSentBox" runat="server" SelectMethod="GetSentMessages"
    TypeName="PBOffice.BLL.MsgMngBLL">
    <SelectParameters>
      <asp:SessionParameter DefaultValue="" Name="user" SessionField="userManage" Type="Object" />
    </SelectParameters>
  </asp:ObjectDataSource>
  <asp:Button ID="bDelete" runat="server" Text="删除选定项" onclick="bDelete_Click" />
  <asp:Button ID="bReturn" runat="server" PostBackUrl="~/MsgMng/EmailBox.aspx" Text="返回" />
  </asp:Content>
